package com.ruoyi.trainScript.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 预测岗位训练记录对象 bole_scrpit_train_record
 * 
 * @author wujiale
 * @date 2025-08-02
 */
public class BoleScrpitTrainRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 训练职位名称（如：数据分析师预测、算法工程师预测） */
    @Excel(name = "训练职位名称", readConverterExp = "如=：数据分析师预测、算法工程师预测")
    private String trainJob;

    /** 训练职位编码（唯一标识，如：DA_PREDICT、ALGO_PREDICT） */
    @Excel(name = "训练职位编码", readConverterExp = "唯=一标识，如：DA_PREDICT、ALGO_PREDICT")
    private String trainJobCode;

    /** 训练数据路径（本地文件路径或云存储URL） */
    @Excel(name = "训练数据路径", readConverterExp = "本=地文件路径或云存储URL")
    private String dataPath;

    /** 训练数据大小（单位：字节） */
    @Excel(name = "训练数据大小", readConverterExp = "单=位：字节")
    private Long dataSize;

    /** 模型版本 */
    @Excel(name = "模型版本")
    private String modelVersion;

    /** 训练状态（0：未开始，1：训练中，2：成功，3：失败） */
    @Excel(name = "训练状态", readConverterExp = "0=：未开始，1：训练中，2：成功，3：失败")
    private Long trainStatus;

    /** 训练开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "训练开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date trainStartTime;

    /** 训练结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "训练结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date trainEndTime;

    /** 预测准确率（%） */
    @Excel(name = "预测准确率", readConverterExp = "%=")
    private BigDecimal accuracy;

    /** 精确率（%） */
    @Excel(name = "精确率", readConverterExp = "%=")
    private BigDecimal precision;

    /** 召回率（%） */
    @Excel(name = "召回率", readConverterExp = "%=")
    private BigDecimal recall;

    /** F1分数（%） */
    @Excel(name = "F1分数", readConverterExp = "%=")
    private BigDecimal f1Score;

    /** 训练参数（JSON格式，如：{"epoch":50,"batch_size":32}） */
    @Excel(name = "训练参数")
    private String trainParams;

    /** 错误信息（训练失败时记录） */
    @Excel(name = "错误信息", readConverterExp = "训=练失败时记录")
    private String errorMsg;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTrainJob(String trainJob) 
    {
        this.trainJob = trainJob;
    }

    public String getTrainJob() 
    {
        return trainJob;
    }
    public void setTrainJobCode(String trainJobCode) 
    {
        this.trainJobCode = trainJobCode;
    }

    public String getTrainJobCode() 
    {
        return trainJobCode;
    }
    public void setDataPath(String dataPath) 
    {
        this.dataPath = dataPath;
    }

    public String getDataPath() 
    {
        return dataPath;
    }
    public void setDataSize(Long dataSize) 
    {
        this.dataSize = dataSize;
    }

    public Long getDataSize() 
    {
        return dataSize;
    }
    public void setModelVersion(String modelVersion) 
    {
        this.modelVersion = modelVersion;
    }

    public String getModelVersion() 
    {
        return modelVersion;
    }
    public void setTrainStatus(Long trainStatus) 
    {
        this.trainStatus = trainStatus;
    }

    public Long getTrainStatus() 
    {
        return trainStatus;
    }
    public void setTrainStartTime(Date trainStartTime) 
    {
        this.trainStartTime = trainStartTime;
    }

    public Date getTrainStartTime() 
    {
        return trainStartTime;
    }
    public void setTrainEndTime(Date trainEndTime) 
    {
        this.trainEndTime = trainEndTime;
    }

    public Date getTrainEndTime() 
    {
        return trainEndTime;
    }
    public void setAccuracy(BigDecimal accuracy) 
    {
        this.accuracy = accuracy;
    }

    public BigDecimal getAccuracy() 
    {
        return accuracy;
    }
    public void setPrecision(BigDecimal precision) 
    {
        this.precision = precision;
    }

    public BigDecimal getPrecision() 
    {
        return precision;
    }
    public void setRecall(BigDecimal recall) 
    {
        this.recall = recall;
    }

    public BigDecimal getRecall() 
    {
        return recall;
    }
    public void setF1Score(BigDecimal f1Score) 
    {
        this.f1Score = f1Score;
    }

    public BigDecimal getF1Score() 
    {
        return f1Score;
    }
    public void setTrainParams(String trainParams) 
    {
        this.trainParams = trainParams;
    }

    public String getTrainParams() 
    {
        return trainParams;
    }
    public void setErrorMsg(String errorMsg) 
    {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsg() 
    {
        return errorMsg;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("trainJob", getTrainJob())
            .append("trainJobCode", getTrainJobCode())
            .append("dataPath", getDataPath())
            .append("dataSize", getDataSize())
            .append("modelVersion", getModelVersion())
            .append("trainStatus", getTrainStatus())
            .append("trainStartTime", getTrainStartTime())
            .append("trainEndTime", getTrainEndTime())
            .append("accuracy", getAccuracy())
            .append("precision", getPrecision())
            .append("recall", getRecall())
            .append("f1Score", getF1Score())
            .append("trainParams", getTrainParams())
            .append("errorMsg", getErrorMsg())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
